/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

/include/ "msm8610-qrd.dtsi"

&soc {
	gpio-leds {
		compatible = "gpio-leds";
		status = "disabled";

		gpio_flash: gpio-flash {
			gpios = <&pm8110_gpios 1 0>;
			label = "gpio-flash";
			linux,default-trigger = "gpio_flash_trigger";
		};
	};
    sound {
        qcom,model = "msm8x10-skuab-snd-card";

        qcom,audio-routing =
            "RX_BIAS", "MCLK",
            "INT_LDO_H", "MCLK",
            "Lineout amp", "LINEOUT",
            "MIC BIAS Internal1", "Handset Mic",
            "MIC BIAS Internal2", "Headset Mic",
            "AMIC1", "MIC BIAS Internal1",
            "AMIC2", "MIC BIAS Internal2";

        qcom,ext-spk-amp-gpio = <&msmgpio 92 0x0>;
    };
    i2c@f9923000{
		focaltech@38{
			compatible = "focaltech,5x06";
			reg = <0x38>;
			interrupt-parent = <&msmgpio>;
			interrupts = <1 0x2>;
			vdd-supply = <&pm8110_l19>;
			vcc_i2c-supply = <&pm8110_l14>;
			focaltech,family-id = <0x06>;
			focaltech,reset-gpio = <&msmgpio 0 0x00>;
			focaltech,irq-gpio = <&msmgpio 1 0x00>;
			focaltech,display-coords = <0 0 480 854>;
			focaltech,panel-coords = <0 0 480 946>;
			focaltech,button-map= <139 102 158>;
			focaltech,no-force-update;
			focaltech,i2c-pull-up;
		};
		goodix@5d {
			compatible = "goodix,gt9xx";
			reg = <0x5d>;
			interrupt-parent = <&msmgpio>;
			interrupts = <1 0x2008>;
			reset-gpios = <&msmgpio 0 0x00>;
			interrupt-gpios = <&msmgpio 1 0x00>;
			vdd-supply = <&pm8110_l19>;
			vcc-i2c-supply = <&pm8110_l14>;
			goodix,panel-coords = <0 0 540 980>;
			goodix,display-coords = <0 0 540 960>;
			goodix,button-map= <139 172 158>;
			goodix,product-id = "915";
			goodix,enable-power-off;
			goodix,cfg-data0 = [
				46 1C 02 C0 03 0A 05 11 01 08
				14 3B 46 32 03 05 00 00 00 00
				00 00 00 00 00 00 00 8A 09 0B
				39 00 99 0A 00 00 02 83 03 1D
				00 08 00 00 00 00 00 00 00 00
				00 1D 73 94 C5 02 07 00 00 04
				78 21 00 5C 2C 00 48 3A 00 3A
				4C 00 2F 65 00 30 10 30 50 00
				56 45 35 FF FF 17 00 00 00 00
				00 01 1C 15 0C 14 5F 03 02 00
				00 00 00 00 00 00 00 00 00 00
				00 00 16 14 12 10 0E 0C 0A 08
				06 04 02 FF FF FF 00 00 00 00
				00 00 00 00 00 00 00 00 00 00
				00 00 22 21 20 1F 1E 1D 1C 18
				16 12 10 0F 0C 0A 08 06 04 02
				00 FF FF FF FF FF FF FF 00 00
				00 FF FF FF FF FF FF FF FF FF
				F8 FF FF FF E4 01];
		};
	};
	gen-vkeys {
		compatible = "qcom,gen-vkeys";
		label = "ft5x06_ts";
		qcom,disp-maxx = <480>;
		qcom,disp-maxy = <854>;
		qcom,panel-maxx = <481>;
		qcom,panel-maxy = <946>;
		qcom,key-codes = <139 102 158>;
		qcom,y-offset = <0>;
	};

	i2c@f9924000 { /* BLSP-1 QUP-2 */
		nfc-nci@e {
			compatible = "qcom,nfc-nci";
			reg = <0x0e>;
			qcom,irq-gpio = <&msmgpio 77 0x00>;
			qcom,dis-gpio = <&msmgpio 93 0x00>;
			qcom,clk-en-gpio = <&msmgpio 78 0x00>;
			qcom,clk-src = "GPCLK2";
			interrupt-parent = <&msmgpio>;
			interrupts = <77 0>;
			qcom,clk-gpio = <&msmgpio 75 0x00>;
		};
	};

    i2c@f9925000 {
		fsl@1c {
			compatible = "fsl,mma8x5x";
			reg = <0x1c>;
			interrupt-parent = <&msmgpio>;
			interrupts = <81 0x2>;
			vdd-supply = <&pm8110_l19>;
			vio-supply = <&pm8110_l14>;
			fsl,irq-gpio = <&msmgpio 81 0x00>;
			fsl,sensors-position = <1>;
		};
		stk@48 {
			compatible = "stk,stk3x1x";
			reg = <0x48>;
			interrupt-parent = <&msmgpio>;
			interrupts = <80 0x2>;
			vdd-supply = <&pm8110_l19>;
			vio-supply = <&pm8110_l14>;
			stk,irq-gpio = <&msmgpio 80 0x02>;
			stk,transmittance = <340>;
			stk,state-reg = <0x00>;
			stk,psctrl-reg = <0x71>;
			stk,alsctrl-reg = <0x38>;
			stk,ledctrl-reg = <0xFF>;
			stk,wait-reg = <0x07>;
			stk,ps-thdh = <150>;
			stk,ps-thdl = <100>;
			stk,use-fir;
		};
	};

	usb@f9a55000 {
               qcom,hsusb-otg-phy-init-seq =
                       <0x44 0x80 0x6a 0x81 0x34 0x82 0x23 0x83 0xffffffff>;
	};
};

/ {
	qrd_batterydata: qcom,battery-data {
		qcom,rpull-up-kohm = <100>;
		qcom,vref-batt-therm = <1800000>;

		/include/ "batterydata-qrd-4v2-1800mah.dtsi"
	};
};

&pm8110_bms {
	status = "ok";
	qcom,battery-data = <&qrd_batterydata>;
};

&pm8110_chg {
	qcom,battery-data = <&qrd_batterydata>;
};

&mdss_mdp {
	qcom,mdss-pref-prim-intf = "dsi";
};

&mdss_dsi0 {
	qcom,dsi-pref-prim-pan = <&dsi_otm8018b_fwvga_vid>;
};

&dsi_otm8018b_fwvga_vid {
	qcom,cont-splash-enabled;
};
